#ifndef GAMEENGINE_H_INCLUDED
#define GAMEENGINE_H_INCLUDED

#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <vector>
#include "Utility.h"

class GameState;

class GameEngine
{
public:

	void Init();
	void Cleanup();

	void ChangeState(GameState* state);
	void PushState(GameState* state);
	void PopState();

	void Events();
	void Update();
	void Render();

	bool Running() { return m_running; }
	void Quit() { m_running = false; }

    sf::Clock gameClock;

private:
	// the stack of states
	std::vector<GameState*> states;

    sf::RenderWindow Window;

    static const int SCREENWIDTH = 1024;
    static const int SCREENHEIGHT = 768;
    int FRAMERATE = 60;
    int GAMESPEED = 30; //# of cycles per second
	bool m_running;



};

#endif // GAMEENGINE_H_INCLUDED
